﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using ServiceMatrix;

namespace Match
{
    public static class Match_Dictionary
    {
        public static string ByDictionary(Bitmap[] list, Dictionary<string, char> dic)
        {
            StringBuilder sb = new StringBuilder();
            foreach (Bitmap bmp in list)
            {
                string code = Builder_Matrix.Bitmap2Str(bmp, "", false);
                if (dic.ContainsKey(code))
                {
                    sb.Append(dic[code]);
                }
                else
                {
                    return "0";
                }
            }
            return sb.ToString();
        }
    }
}
